package com.leenmvc.core.dao.communal.dataEntity;

import org.apache.ibatis.session.SqlSessionFactory;

import javax.sql.DataSource;
import java.io.Serializable;

/**
 * dataSourceFactory和sqlSessionFactory的容器
 * 一对一对地出现
 */
public class DataSourceFactory implements Serializable {

    private DataSource dataSource;

    private SqlSessionFactory sqlSessionFactory;

    public DataSourceFactory(DataSource dataSource, SqlSessionFactory sqlSessionFactory) {
        this.dataSource = dataSource;
        this.sqlSessionFactory = sqlSessionFactory;
    }

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public SqlSessionFactory getSqlSessionFactory() {
        return sqlSessionFactory;
    }

    public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
        this.sqlSessionFactory = sqlSessionFactory;
    }
}